/**
 * Created by Administrator on 2017/3/21.
 */
import React, {Component,Fragment} from 'react';
import {Form, Input, Radio, Select, Switch, InputNumber} from 'antd';
import {connect} from 'dva';
const FormItem = Form.Item;
@connect(({roles}) => ({
  roles
}))
class AddPoliciesForm extends Component {
  constructor(props) {
    super(props);
    this.state = {
      showCustom: false
    };
  }

  componentDidMount() {
    const {dispatch} = this.props;
  }

  render() {
    const formItemLayoutWithLabel = {
      labelCol: {
        xs: {span: 24},
        sm: {span: 7},
      },
      wrapperCol: {
        xs: {span: 24},
        sm: {span: 15},
      }
    };

    const {getFieldDecorator} = this.props.form;
    return (
      <div>
        <Form onSubmit={this.handleSubmit}>
          <FormItem
            {...formItemLayoutWithLabel}
            label={(
              <span>
               初始佣金(元)
            </span>
            )}
          >
            {getFieldDecorator('initial_commission', {
              initialValue: this.props.editRecord ? this.props.editRecord.initial_commission : '',
              rules: [{ required: true, message: '请输入初始佣金' }],

            })(
              <InputNumber min={0} style={{width:'100%'}}/>
            )}
          </FormItem>
        </Form>
      </div>
    );
  }
}

const AddPoliciesFormWrap = Form.create()(AddPoliciesForm);
export default connect()(AddPoliciesFormWrap);


